/*
 * Copyright (c) 2007, TopCoder, Inc. All rights reserved.
 */

using System;
using System.Runtime.Serialization;

namespace TopCoder.Util.Calendar.Entry
{
    /// <summary>
    /// <para>
    /// Represents exception thrown to indicate any error occurs while reading configuration
    /// data for the classes in this component, for example: missing required configuration
    /// data or any data is invalid.
    /// </para>
    /// <para>
    /// The exception will be thrown from the constructors that take a 'namespace' parameter
    /// or use a default namespace to load configuration parameters.
    /// </para>
    /// </summary>
    /// <remarks>
    /// Thread-Safety: This class is immutable and thread safe.
    /// </remarks>
    ///
    /// <author>snower, fuyun</author>
    /// <version>1.0</version>
    /// <copyright>Copyright (c) 2007, TopCoder, Inc. All rights reserved.</copyright>
    [Serializable]
    public class ConfigurationException : ApplicationException
    {
        /// <summary>
        /// Creates a new <c>ConfigurationException</c> instance.
        /// </summary>
        public ConfigurationException()
        {
        }

        /// <summary>
        /// <para>
        /// Creates a new <c>ConfigurationException</c> instance with the given error message.
        /// </para>
        /// </summary>
        /// <param name="message">The detailed error message of this exception.</param>
        public ConfigurationException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Creates a new <c>ConfigurationException</c> instance with the given error
        /// message and cause.
        /// </summary>
        /// <param name="message">The detailed error message of this exception.</param>
        /// <param name="cause">The inner cause of this exception.</param>
        public ConfigurationException(string message, Exception cause)
            : base(message, cause)
        {
        }

        /// <summary>
        /// Creates a new <c>ConfigurationException</c> instance with serialized data.
        /// </summary>
        /// <param name="info">The object that holds the serialized object data.</param>
        /// <param name="context">The contextual information about the source or destination.</param>
        protected ConfigurationException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

    }
}